<?php
       include "shopping.php";

$id=$_REQUEST['id'];
$username=$_REQUEST['username'];
$goodsimg=$_REQUEST['goodsimg'];
$goodsname=$_REQUEST['goodsname'];
$goodsnews=$_REQUEST['goodsnews'];
$goodsprice=$_REQUEST['goodsprice'];
$goodsshop=$_REQUEST['goodsshop'];
$number=$_REQUEST['number'];
$num=$_REQUEST['num'];
$type=$_REQUEST['type'];
// var_dump($id,$username,$goodsimg,$goodsname,$goodsnews,$goodsprice);



mysqli_select_db($conn,"shopping");

  $sql =  "insert into user_goods(username,goodsid,goodsimg,goodsname,goodsnews,goodsprice,number,goodsshop,`type`,`num`) values 
  ('$username','$id','$goodsimg','$goodsname','$goodsnews','$goodsprice','$number','$goodsshop','$type','$num')";

   $result=mysqli_query($conn,$sql);
     

    if (!$result){
        echo '数据添加失败！';
    }else{
        echo '数据添加成功！';
    }

    mysqli_close($conn);
?>
